extends PopupPanel



var call_back:FuncRef = null


func set_data(title,call_back,min_value = 1,max_value = 100):
	self.call_back = call_back
	$VBoxContainer/Label.text = title
	$VBoxContainer/SpinBox.min_value = min_value
	$VBoxContainer/SpinBox.max_value = max_value
	pass

func _on_Cancel_pressed():
	if call_back != null:
		call_back.call_func(0,$VBoxContainer/SpinBox.value)
	MainTool.getUILayer().pop_ui()
	pass # Replace with function body.


func _on_Ok_pressed():
	if call_back != null:
		call_back.call_func(1,$VBoxContainer/SpinBox.value)
	MainTool.getUILayer().pop_ui()
